package com.adam.example.types;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)  //忽略不在Book类中出现的字段
public class Book {
    private Long id;
    private String title;
    private String description;
    private String author;
    private String language;
    private Double price;
    private String publish_time;

    public Book() {
    }

    public Book(Long id, String title, String description, String author, String language, Double price, String publish_time) {
        this.id = id;
        this.title = title;
        this.description = description;
        this.author = author;
        this.language = language;
        this.price = price;
        this.publish_time = publish_time;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(String publish_time) {
        this.publish_time = publish_time;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", author='" + author + '\'' +
                ", language='" + language + '\'' +
                ", price=" + price +
                ", publish_time='" + publish_time + '\'' +
                '}';
    }
}
